Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service file to fix symlink for wpa_supplicant.conf #337

Merged
merged 1 commit into from
Apr 5, 2017

Conversation

foosel
Copy link
Collaborator

@foosel foosel commented Apr 5, 2017

Included script will make sure that if wpa_supplicant.conf is no
longer a symlink but it and /boot/octopi-wpa-supplicant.txt exist,
the selected wifi country will be extracted and written to
/boot/octopi-wpa-supplicant.txt and then the symlink will be
recreated. If wpa_supplicant.conf is completely gone, only the
symlink will be recreated. Nothing will be done if
/boot/octopi-wpa-supplicant.txt does not exist.

The service file ensures that this check is done on every boot,
after the local file system becomes available but before the
networking gets initialized.

This should solve #336

Note that this requires systemd (Debian Jessie) - since current
Raspbian starts SysV init scripts only after networking has
started to initialized, it was impossible for me to create a
SysV init script that fixes the symlink prior to network
initialization.

Included script will make sure that if wpa_supplicant.conf is no
longer a symlink but it and /boot/octopi-wpa-supplicant.txt exist,
the selected wifi country will be extracted and written to
/boot/octopi-wpa-supplicant.txt and then the symlink will be
recreated. If wpa_supplicant.conf is completely gone, only the
symlink will be recreated. Nothing will be done if
/boot/octopi-wpa-supplicant.txt does not exist.

The service file ensures that this check is done on every boot,
after the local file system becomes available but before the
networking gets initialized.

This should solve guysoft#336

Note that this requires systemd (Debian Jessie) - since current
Raspbian starts SysV init scripts only after networking has
started to initialized, it was impossible for me to create a
SysV init script that fixes the symlink prior to network
initialization.
@guysoft guysoft merged commit 98169f7 into guysoft:devel Apr 5, 2017
@foosel foosel mentioned this pull request Apr 18, 2017
@guysoft guysoft mentioned this pull request Jun 18, 2017
guysoft added a commit that referenced this pull request Mar 1, 2018
guysoft added a commit to guysoft/CustomPiOS that referenced this pull request Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants